import com.golden.gamedev.object.Background;
import com.golden.gamedev.object.Sprite;
import com.golden.gamedev.object.collision.CollisionBounds;


public class BallHitBounds extends CollisionBounds{

	public BallHitBounds(Background arg0) {
		super(arg0);
	}

	@Override
	public void collided(Sprite arg0) {
		if(arg0 != null)
		{
			if(isCollisionSide(BOTTOM_COLLISION) || isCollisionSide(TOP_COLLISION))
				arg0.setVerticalSpeed(-(arg0.getVerticalSpeed()));
			if(isCollisionSide(LEFT_COLLISION)|| isCollisionSide(RIGHT_COLLISION))
				arg0.setActive(false);
		}		
	}

}
